<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::get('/twt', function () {
    return view('home.z-page');
});//打开第二页网页

Route::get('/twt/pay', function () {
    return view('home.pay.pay');
});//


Route::get('test','Admin\TestController@test');

//后台
Route::get('/admin/index/index','Admin\IndexController@index');
//用户管理
Route::get('/admin/user/add','Admin\UserController@add');
Route::post('/admin/user/insert','Admin\UserController@insert');
Route::get('/admin/user/index','Admin\UserController@index');
Route::get('/admin/user/edit/{id}','Admin\UserController@edit');
Route::post('/admin/user/update','Admin\UserController@update');
Route::get('/admin/user/delete/{id}','Admin\UserController@delete');
//分类管理
Route::get('/admin/cate/add','Admin\CateController@add');
Route::post('/admin/cate/insert','Admin\CateController@insert');
Route::get('/admin/cate/index','Admin\CateController@index');
Route::get('/admin/cate/edit/{id}','Admin\CateController@edit');
Route::post('/admin/cate/update','Admin\CateController@update');
Route::get('/admin/cate/delete/{id}','Admin\CateController@delete');
//文章--路由管理
Route::resource('/admin/article','Admin\ArticleController');

//品牌表格
Route::get('/admin/brand','Admin\BrandController@index');

Route::get('/admin/brand/delete/{id}','Admin\BrandController@delete');

Route::get('/admin/brand/edit/{id}','Admin\BrandController@edit');
Route::get('/admin/brand/add','Admin\BrandController@add');
Route::post('/admin/brand/insert','Admin\BrandController@insert');
Route::post('/admin/brand/update','Admin\BrandController@update');

//支付管理、添加银行
	//支付管理首页
Route::get('/admin/pay','Admin\PayController@index');

Route::get('/admin/pay/add','Admin\PayController@add');


Route::get('/admin/pay/delete/{id}','Admin\PayController@delete');

Route::get('/admin/pay/edit/{id}','Admin\PayController@edit');

Route::post('/admin/pay/insert','Admin\PayController@insert');
Route::post('/admin/pay/update','Admin\PayController@update');

//订单管理
Route::get('/admin/order','Admin\OrderController@index');

Route::get('/admin/order/add','Admin\OrderController@add');


Route::get('/admin/order/delete/{id}','Admin\OrderController@delete');

Route::get('/admin/order/edit/{id}','Admin\OrderController@edit');
//ajax路由
Route::post('/admin/order/ajaxreq','Admin\OrderController@ajaxreq');

Route::post('/admin/order/insert','Admin\OrderController@insert');
Route::post('/admin/order/update','Admin\OrderController@update');

//前台首页
Route::get('/','Home\IndexController@index');

//前台分类管理
//ajax路由
Route::post('/home/cate/ajaxreq','Home\CateController@ajaxreq');
//分类页
Route::get('/home/cate/zpage/{id}','Home\CateController@zpage');
Route::get('/home/cate/brand/{id}','Home\CateController@brand');
//新品专区
Route::get('/home/cate/spage','Home\CateController@spage');
Route::get('/home/cate/tpage','Home\CateController@tpage');
//进入个人中心，找订单。
Route::get('/home/pay/order','Home\PayController@order');